package com.ruoyi.commodity.service;

import com.ruoyi.commodity.domain.CommodityCategory;
import com.ruoyi.commodity.domain.vo.CommodityTreeSelect;

import java.util.List;

/**
 * @description:分类管理服务层
 * @author: Steven
 * @date: 2023/7/12 0012 15:06
 **/
public interface ICommodityCategoryService {

    List<CommodityCategory> selectCommodityCategoryList(CommodityCategory commodityCategory);

    CommodityCategory selectCommodityCategoryById(Long categoryId);

    int insertCommodityCategory(CommodityCategory commodityCategory);

    boolean checkCommodityCategoryNameUnique(CommodityCategory commodityCategory);

    int selectNormalChildrenCategoryById(Long categoryId);

    int updateCommodityCategory(CommodityCategory commodityCategory);

    boolean hasChildByCategoryId(Long categoryId);

    boolean checkCategoryExistCommodity(Long categoryId);

    int deleteCategoryById(Long categoryId);

    List<CommodityTreeSelect> selectCategoryTreeList(CommodityCategory commodityCategory);

    List<CommodityTreeSelect> buildCategoryTreeSelect(List<CommodityCategory> commodityCategories);

    List<CommodityCategory> buildCategoryTree(List<CommodityCategory> commodityCategories);


}
